package com.loongtech.bi.entity.system;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

@Entity
@Table(name = "system_model")
public class EntitySysModel implements Serializable {
	private static final long serialVersionUID = 1L;

    @Id
    private Integer id;				//主键
	@Column(columnDefinition="varchar(255) NOT NULL default ''")
	private String name;
	@Column(columnDefinition="int(11) default 0")
	private int fatherId;
	@Column(columnDefinition="int(11) default 0")
	private int sort;
	@Column(columnDefinition="varchar(255)")
	private String description;

    private int version = 1;			//乐观锁

    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getFatherId() {
		return fatherId;
	}

	public void setFatherId(int fatherId) {
		this.fatherId = fatherId;
	}

	public int getSort() {
		return sort;
	}

	public void setSort(int sort) {
		this.sort = sort;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

    @Override
    public String toString() {
        return "EntitySysModel{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", fatherId=" + fatherId +
                ", sort=" + sort +
                ", description='" + description +
                '}';
    }

}